Editing
Phong
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Commands = == meetings == Every hackerspace should have meetings. They are an essential component of keeping the space together. === Options === * -r, --remind - If there is a meeting today, send a reminder mail if it hasn't been sent already. * -w, --wiki - Do wiki administrivia * -m, --minutes - If there was a meeting since the last run, mail out a copy of the minutes === Wiki setup === Phong uses a very specific wiki setup. The good news, is that it is trivial to configure. There are three special pages, two of which Phong will kindly maintain for you: * [[Meetings/Template]] * [[Next Meeting]] * [[Last meeting]] (These pages and their contents are configurable. See the relevant section below.) The [[Next Meeting]] page should be exactly: <pre>#Redirect [[Meetings/YYYY-MM-DD]]</pre> While [[Last Meeting]] should be exactly: <pre>#Redirect [[Meetings/YYYY-MM-DD]]</pre> Replace YYYY, MM, DD with the numeric values of the year, month, and day of the respective meetings. This should only need to be done once. Unfortunately, there is no bootstrapping for this builtin to Phong. The rationale being that you are unlikely to have a full working setup of Phong and MediaWiki before you have at least a couple of meetings to discuss starting your hackerspace. Sorry. Meetings happen once a week on the same day. That is exactly 7 days apart. None of that every other wednesday/first saturday of the month/days that have prime numbers rubbish. Please see http://hackerspaces.org/wiki/The_Plenum_Pattern for details why this will never change. You will have to create [[Meetings/Template]] on your own. This page forms the basis for your meeting minutes, and it is copied to create the next week's meeting page. While the template contents are entirely up to you, you should have at least something similar to the following: <pre><phongTemplate> {{Infobox_meeting |time=7PM |date=$date |venue=21 West North |next=$next |previous=$previous }} </phongTemplate></pre> Your wiki should have a template called Infobox_meeting. Its content is up to you, but check out SYNHAK's for an example: <pre>https://synhak.org/wiki/Template:Infobox_meeting</pre> ''Please note:'' The template for this page is ''not'' User:Phong/Templates/ (or whatever you have configured). The rationale for this is that the meeting agenda should be a core component of your hackerspace's governance. If your space is ran by the membership and not a president or benevolent dictator, the membership should feel welcome to change the agenda as they see fit. This meeting template should be a special template, as compared to more mundane ones such as the one for mailing out meeting minutes, or for announcing upcoming events. === Configuration === "But my space is different!!11", you scream into the aether. Thats okay. Phong understands. There are a few configuration options that Phong understands to adapt to your space. * next-page - Instead of "Next Meeting", maybe yours is named "Next meeting" * previous-page - Instead of "Previous Meeting", maybe yours is named "Last meeting" * meeting-template - Don't want to use Meetings/Template? Fine. Set it to "Meeting Notes Template". * meeting-title-format - Meetings aren't in the format of Meetings/%Y-%m-%d? Noisebridge uses Meeting Notes %Y %m %d, for example. See the documentation for python's strptime/strftime functions in the datetime module. === Template variables === When producing the next week's page and all emails, a number of variables are available: * $date - The date the meeting will be occuring on * <math>next and </math>previous - The page names (i.e. Meetings/YYYY-MM-DD) of the next meetings. Your template should include the square brackets. * $meetingLink - A full URI that points to the wiki page for the next meeting == new-event-mails == Phong can inform the community about upcoming events that were previously created in spiff. === Options === * -p PERIOD, --period PERIOD - An integer number of days to look ahead for upcoming events. Defaults to 7. If an event is more than this many days away, it won't be mentioned in the mails. === Wiki templates === This command uses one template: Events/UpcomingEventMail. It has the following variables available for use: * $upcoming - Any upcoming events that haven't been in a previous email * $today - Events that are starting in the next 24 hours. Please note: This does not mean "events that start after 12:00 or before 24:00". It means 24 hours from when the command is ran. * $period - How many days in advance Phong looked for upcoming events == build-documents == Phong will happily build documents from git repos for you and make them available on the web! To properly use this out of the box, each git repository must have a Makefile at its root that has a default target to generate files. By default Phong will upload the following file suffixes: * .pdf * .png * .svg There are currently two modes of output. Specify -o /some/path to write to a directory, or -s some-bucket-name/path to upload to S3. === Options === * -c COMMAND, --command COMMAND - Command line to generate PDF documents * -r REPO, --repo REPO - A URI that git clone will accept. Can be specified multiple times for multiple repositories * -s S3CFG, --s3cfg S3CFG - Path to s3cmd configuration to use for uploading * -b BUCKET, --bucket BUCKET - Amazon S3 bucket name and path * -o OUTPUT, --output OUTPUT - Output path to copy files to * -f FILE_SUFFIX --file-suffix FILE_SUFFIX File suffixes to upload in addition to the default set. May be specified more than once. === Wiki templates === This command uses one template: Documents/Index. It has the following variables available for use: * $files - The list of files generated == sudo == Sometimes, you want to run a particular command as a different user, such as for processing e-mails, listing mailman subscriptions, or whatnot. Instead of configuring sudo, Phong provides a simpler and less flexible method of running commands as other users. In this command, Phong loads /etc/phong.cfg and ignores any other options passed before 'sudo' in the command line. To configure, create a [[#sudo|sudo]] section in /etc/phong.cfg that maps aliases to commands, along with a subsection for each alias: <pre>[sudo] docs=build-documents [sudo:build-documents] allowed-users=apache allowed-groups=www-dev,apache,wheel run-as-user=phong run-as-group=phong</pre> The only required option in an alias' configuration is run-as-user. By default, allowed-users and allowed-groups is blank and nobody is permitted to run the command. run-as-user specifies the login name or UID to run the command as. Allowed-users and allowed-groups are comma-separated lists of login/group names or UIDs that are permitted to run a given alias. If run-as-group is not specified, it defaults to the primary group for the login specified in run-as-user. For convienence, a helpful setuid wrapper is provided as phong-su. It defaults to running /usr/bin/phong.py, and may only be changed at compile time. setup.py does not automatically set the setuid bit on phong-su, for security purposes. There are no command line options or templates for the sudo command. == tweet == The tweet command sends a tweet. To configure, you need to visit http://dev.twitter.com/apps and generate a set of OAuth tokens which are then placed in your phong.cfg: <pre>[twitter] consumer_key=your-consumer-key consumer_secret=consumer-secret access_token=access-token access_secret=access-token-secret</pre> Then, it is as simple as: <pre>$ phong.py tweet 'Hello, World!'</pre> {{ManualPage}}
Summary:
Please note that all contributions to Noisebridge are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Noisebridge:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Request account
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Dig in!
Noisebridge
- Status: MOVED
- Donate
- ABOUT
- Accessibility
- Vision
- Blog
Manual
MANUAL
Visitors
Participation
Community Standards
Channels
Operations
Events
EVENTS
Guilds
GUILDS
- Meta
- Electronics
- Fabrication
- Games
- Music
- Library
- Neuro
- Philosophy
- Funding
- Art
- Crypto
- Documentation/Wiki
Wiki
Recent Changes
Random Page
Help
Categories
(Edit)
Tools
What links here
Related changes
Special pages
Page information