Pastebot



  • CONFIGURING PASTEBOT
  • TROUBLESHOOTING
  1. Multi-Platform Clipboard Manager with Advanced Features. View 88 alternatives to CopyQ.
  2. Pastebot is showcased as the ultimate clipboard manager for your iPhone: they say “Command Copy and Paste”. Indeed, it’s a great clipboard manager, with many features other apps don’t have: 99 items, information about the items you’ve stored, built-in editing.

pastebot - the original clipboard to chat gateway

In electronic design automation, the solder paste mask and thus the stencil is defined in a layer typically named tCream/bCream, PasteTop/PasteBot, PASTE-VS/PASTE-RS, GTP/GBP (Gerber and many others). For improved accuracy, stencils traditionally were often mounted in proprietary aluminum frames of various kinds. Pastebot saves everything you copy so that you can quickly recall them in the future. Save and organize frequently-used clippings into custom pasteboards and create keyboard shortcuts to access. GitHub Gist: star and fork pastebot's gists by creating an account on GitHub.

pastebot -f configfile

Pastebot is an IRC bot and a web server in one program. Users submit short pieces of text to the web server, and the IRC bot announces them in IRC.

A single pastebot instance can provide one or more web servers, each accepting connections on a different virtual host and/or port.

Likewise, a single pastebot may connect to zero or more IRC networks and announce pastes on zero or more channels on each. The pastebot merely acts as a web service in zero-bot mode.

Nearly all of pastebot's options are set in a configuration file. The general syntax for this file follows these rules:

Sections are defined by text that begins in the first column. Section parameters are indented and consist of a parameter name and its value separated by whitespace. This example defines a web_server section named 'poenet' that listens on port 8888.

Each section defines a component type within the pastebot. Each section requires a unique name since there may be more than one instance of a component. The names permit the program to reference specific components without confusion.

Some parameters may contain multiple values, though. Each value is defined on a separate configuration line using the same parameter name. For example, it's useful to configure multiple IRC servers for a bot to choose from. If one server is unavailable, it can try another. Here's how that's done:

Configuration files may contain comments, which are text after a hash mark ('#'). Comments and blank lines are ignored.

That's all.

Pastebot configuration is broken down into three section types: 'web_server', 'irc', and 'pastes'. They define the web server, irc network, and paste database that the bot will use.

Optional Administrivia

These settings make it easier to administrate pastebot. Right now it only covers a PID file, but may be expanded upon in the future. This entire section is optional, but is global for the bot.

A sample:

name

The name for this section. 'administrivia' is simple and clear, but it's not limited to this.

pidfile

A path, absolute or relative, that will hold a PID for the bot. Upon startup, this file will be read and its contents interpreted as a PID. Toyota td25 manual. If this PID is running, pastebot will exit with a message notifying the administrator of this fact. If this PID is not running, pastebot will write its own PID to the pidfile before continuing.

Configuring a Web Server

The web_server section defines a pastebot's web server. A pastebot may have more than one web server. Each web server is defined in a separate web_server section, and each must have a different name.

A sample:

Pastebot for mac
iface HOST_OR_ADDRESS
Pastebot

Defines the interface host or numeric address that this web server will bind to while listening for new connections. It's common for the interface address to be different than the one the outside world sees. Required.

ifname HOST_OR_ADDRESS

Defines the web server's public address, which is displayed to users in various messages and may be different than the internal address the web service has bound to. Optional. If omitted, the value of 'iface' will be used instead.

iname BASE_URL

The 'home page' for the pastebot's web server. It's advertised in multiple places, such as the bot's WHOIS information. The BASE_URL should agree with 'ifname' and 'port'. Optional.

irc IRC_NAME

Identifies the IRC bot that will announce paste URLs. The IRC_NAME is the name of the bot as specified by the 'name' parameter of the 'irc' section. Required.

name NAME

Defines the web server's name. Each web server must have its own name so they can be referenced individually. The web server's name is also used in web page titles and IRC announcements. Required.

port PORT_NUMBER

This is the port the web server listens on. Required.

proxy ADDRESS

Optional. Used when the pastebot's web server is behind a proxy. Identifies the proxy so it may be ignored when headers are examined.

static STATIC_PATH

Optional. Defines the directory that contains static files that will be provided by the pastebot's built-in web server. Templates, graphics, and style sheets for the various served pages go here. It is essentially the Pastebot server's document root. Each web server is permitted to have its own static directory.

The Pastebot comes with a set of default static files that will be used if 'static' is not specified. The files are installed in Bot::Pastebot's architecture-dependent auto directory, which may be found by running the following Perl command:

Just flight traffic x cracker. If 'static' is omitted, the default files will be loaded from that directory.

template CLASS

Optional. Defines the class that implements the templating for generated pages. The class must define specific methods, see Bot::Pastebot::TextTemplate for which methods and return values are expected.

Configuring an IRC Bot

The irc section defines a pastebot's IRC bot. A pastebot may have zero, one, or more IRC bots. Each bot is defined in a separate irc section, and each must have a different name. A pastebot with no IRC bots is a web-only service.

A sample:

away AWAY_MESSAGE

Pastebots set themselves 'away' immediately when they connect to IRC. They run unattended, so there is nobody to answer any messages. This parameter sets the message that will be displayed to anyone examining the bot's WHOIS information.

ccinfo CTCP_CLIENT_INFO

Sets the bot's CTCP CLIENTINFO response. Optional, but some networks require that clients respond to client information requests.

channel CHANNEL

Required. Defines the channel or channels that the pastebot will automatically join when it connects to this IRC network. A pastebot may join multiple channels, each defined as a separate 'channel' entry. The channel prefix '#' may be escaped with a ' allowing the bot to join channels such as ##perl (##perl).

Pastebot Review

cuinfo CTCP_USER_INFO

Sets the bot's CTCP USERINFO response. Optional, but some networks require that clients respond to user information requests.

cver CTCP_VERSION_INFO

Sets the bot's CTCP VERSION response. Optional, but some networks require that clients respond to version requests.

flags USER_FLAGS

Optional. When specified, sets the user flags that the pastebot will set once it has connected to the IRC network. Commonly set to '+i' so the bot will be 'invisible' outside the channels it's currently on. This helps reduce the amount of harassment the bot receives.

iname IRC_NAME

The pastebot's 'IRC name', which is what appears in WHOIS information. By convention, pastebots include their home page URLs here. Be sure the URL's host and port match 'ifname' and 'port' in the appropriate web_server section. Required.

join_cfg_only BOOLEAN

Optional. Defaults to 0 (false). Normally a pastebot will join any channel it's invited into. When join_cfg_only is true, however, the pastebot will only join channels that have been specified in its configuration file.

localaddr ADDRESS

Optional. The localaddr specifies an ADDRESS that the bot will bind to before making connections. This allows the bot to appear online as coming from a particular virtual host ADDRESS, if its host machine has more than one.

name NAME

Required. This is the IRC bot's internal name. To be useful, it should match the 'irc' parameter in one of the web_server sections.

nick NICKNAME

Required. Specifies the bot's nickname on the IRC network. A bot may have multiple nicknames, each specified as a separate configuration line. It will attempt to use them in order, skipping to the next in the list as it determines each is already taken. If every nickname is taken, it will append numeric digits to the names and try again.

The pastebot will periodically try to reclaim one of the original nicknames in its configuration.

quit QUIT_MESSAGE

This sets the pastebot's quit message should it need to log off for any reason.

server SERVER PORT

Sets the IRC server and port to connect to. Required. The pastebot can connect to one of several servers, each specified on a different 'server' line. If one is unavailable, it will rotate to the next.

uname USER_NAME

IRC requires clients to send a short 'user name' when establishing a connection. This parameter specifies that name.

use_ssl BOOLEAN

Optional. Set this flag to a true value to connect over SSL.

server_pass PASSWORD

Optional. Some IRC servers require a private password to connect. This parameter specifies that password.

nickserv_pass PASSWORD

Specifies the password to use to identify to the NickServ nickname service. Upon connecting to the irc server, the command '/msg NickServ IDENTIFY PASSWORD' will be issued to identify the bot to the NickServ service.

Configuring Pastebot's Database

Pastebot must store uploaded text somewhere.

check SECONDS

How often to check for expired pastes. The value is the number of SECONDS between each check. 3600 is an hour, 86400 is a day.

Performing expiration checks too frequently will slow down the bot. Currently these checks are done within the main process, which is cooperatively multitasked. The entire bot pauses while the check occurs.

TODO - Revise the expiration check to work cooperatively, or fork it into a separate process altogether.

count MAX_PASTES

Set a limit on the number of pastes a pastebot's database may hold, regardless whether they're too young to expire. This limit will be disabled if MAX_PASTES is zero.

If set, only the MAX_PASTES newest pastes will remain after a periodic expiration check.

expire MAX_AGE_SECONDS

Sets the maximum limit for the age of pastes to retain. This limit may be disabled if MAX_AGE_SECONDS is zero. If set, however, pastes that are older than MAX_AGE_SECONDS will be purged during a periodic expiration check.

name NAME

Defines the database's name. Each database must have a unique name so they may be addressed individually. Database names are not currently used, but the configuration parser requires every component to be named.

store DIRECTORY

Sets the absolute path of the base directory in which pastes will be stored. This directory will be created if it doesn't exist. Parent directories will not be created, however.

Pastebot is its own web server. It often cannot bind to port 80 because some other web server is already there. The recommended port 8888 may be hostile towards people behind firewalls.

Auto Copy And Paste Bot

Apache users can use ProxyPass to map a directory on their port-80 servers to a running pastebot. This feature requires Apache be built with both mod_proxy and mod_proxy_add_forward.c support, and that the add forward module come before the proxy module. For example:

Once Apache is built, you can create a virtual location for the proxy directory.

Then you must tell Apache to forward any requests in the /pastebot/ directory through to the local Pastebot server. Ek hazaron mein meri behna hai online serial.

Now people can use your pastebot on port 80. Be sure to set your pastebot's 'iname' to match your proxy's address and path. For example:

Common problems and solutions.

Can't locate [some module] in @INC (@INC contains: ..)

Somehow Bot::Pastebot was installed without one or more prerequisites. Install the module that can't be located, and try again.

This error may show up multiple times until each required module is installed. Use a package manager, like the CPAN shell, to automate the process.

IRC client (NAME): socket error occurred: Can't assign requested address

Pastebot

The most likely cause is an unknown host name, either for a local machine or a remote IRC server. If a pastebot has multiple servers specified, it will rotate to the next available server in about a minute.

<something> section <name> is redefined at ##

The error is caused when two or more sections in the pastebot configuration share the same name. To fix it, configure pastebot to use different names for each section.

In practice, the error is very noisy. Fortunately you only need the first line. The following example says which section (pbtest) is redefined, and where (line 68):

Renaming one of the pbtest sections will resolve the conflict.

Pastebot is not sending any pastes to IRC

In the web form, you must use a real IRC nick of someone who is on that channel.

https://rt.cpan.org/Dist/Display.html?Queue=Bot-Pastebot

Pastebot

http://github.com/~rcaputo/bot-pastebot http://gitorious.org/bot-pastebot

http://search.cpan.org/dist/Bot-Pastebot/ irc://irc.perl.org/poe

Pastebot is Copyright (C) 2002-2013 by Rocco Caputo. All rights are reserved. Pastebot is free software; you may redistribute and/or modify it under the same terms as Perl itself.

To install pastebot, copy and paste the appropriate command in to your terminal.

Pastebot Mac

For more information on module installation, please visit the detailed CPAN module installation guide.

At a glance

Cons

Our Verdict

Pastebot is a beautifully designed, tactile pleasure that brings the power of a clipboard manager to your iPhone or iPod touch. Tapbots’ $3 app is simple to use. Copy (or cut) a text snippet, photo, URL, or anything of your choosing from within any iPhone app and then open PasteBot. As soon as the app opens, it imports your clipboard data and stores it in PasteBot for later use.

Once the importing’s done, PasteBot offers you several options. You can organize your clippings into folders—the app’s default folder can only hold 99 clippings, but you can store an unlimited number of clippings in the folders you create. Tapping any clipping in any folder automatically loads it into the iPhone’s clipboard and reveals a small menu, which contains Action and Filters menus as well as a small information window. Tapping a text clipping’s information window displays character and word counts and the date the clipping was created; a photo’s information window displays its creation date and the size of the selected image. Pastebot also offers a high level of intelligence when it comes to what it will or won’t import. If the item you’ve copied is exactly the same as something Pastebot already has stored, the app won’t re-import the clipping.

What appears when you tap the Action menu varies depending on what your clipping is. Tapping an image offers you the option to save it to your photo library, e-mail it, or move it to a different folder. Tapping a text clipping offers the option to search for the text via Google as well as the e-mail and folder options. Alternatively, install the free Pastebot Sync application on your Mac, and you’ll be given the option to paste anything from Pastebot to any application on your Mac and have anything you cut or copy on your Mac be automatically pasted into Pastebot.

Pastebot Sequential Paste

For me, this syncing capability ends up being one of Pastebot’s hidden killer features. Open Pastebot on your iPhone or iPod touch and cruise your Mac, the Web, or any other application copying and cutting everything you want to keep, and Pastebot sucks it all in like a high-tech vacuum cleaner. This, is a very nice feature that’s far less expensive than any of the full-on clipboard apps you’ll find for your Mac.

Pastebot For Pc

Tapping Pastebot’s Filters menu allows you to make changes to images, such as adjusting the brightness, changing saturation levels, or converting the image to black and white. If your selected clipping is text, the Filters menu lets you make changes to the text, like finding and replacing text, converting your text to upper or lowercase letters, adding HTML tags, or smartening or straightening your quotes.

While it’s a great app, Pastebot isn’t perfect: it’s hamstrung by the limitations Apple puts on applications running in the background of your mobile device. Because Pastebot can’t monitor and import everything that’s being copied to the clipboard, you’ll find yourself playing a game of iPhone hopscotch as you continuously bounce between Pastebot and the different apps from which you’re copying information or images. Also, while Pastebot was quite capable when it came to copying images and text from my Mac, copying files other than images in the Finder proved problematic—Pastebot only copied a PNG image of the icon and not the actual file.

Short of those small complaints, Pastebot is now one of my favorite iPhone apps and one that deserves a place of prominence on your iPhone’s home screen.

Pastebot Service

[Jeffery Battersby is an IT Consultant, (very) smalltime actor, and regular contributor to Macworld. He writes about Macs and more at his blog.]