Skip to content

Commit

Permalink
v1.0.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
flyinactor91 committed Mar 28, 2013
0 parents commit fe051e0
Show file tree
Hide file tree
Showing 7 changed files with 616 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Examples/mathExamples.ptg
@@ -0,0 +1,7 @@
//Math For-Loops

for i in 10:for j in 3:y=i+j;print y
println 2
for i in 10:for j in 3:i+j;print ---
println 2
for i in 0..10:for j in 0..3:i+j;print ---
6 changes: 6 additions & 0 deletions Examples/simpleExamples.ptg
@@ -0,0 +1,6 @@
//setdir /home/michael/Pictures/Uploads
setdir this+Uploads

separate iOS_Landscape ExifImageHeight:720 ExifImageWidth:960

separate Apple Make:Apple
21 changes: 21 additions & 0 deletions Examples/sortByDate.ptg
@@ -0,0 +1,21 @@
//Sorts files into folders by date taken

//Date Parameters
yearStart = 2011
yearEnd = 2012
monthStart = 1
monthEnd = 12
dayStart = 1
dayEnd = 31

//Set directory to sort
//setdir /home/michael/Pictures/Uploads
setdir this+Uploads
getdir
//Separate by date
for year in yearStart..yearEnd:for month in monthStart..monthEnd:for day in dayStart..dayEnd:separate $year$-$month$-$day$ Date:$year$/$month$/$day$

//for year in 2010..2012:for month in 1..12:for day in 1..31:separate $day$ Date:$year$/$month$/$day$


print Finished with Date
14 changes: 14 additions & 0 deletions Examples/sortByHeight.ptg
@@ -0,0 +1,14 @@
//Sorts files into folders by height in increments of 10 pixels

//Date Parameters
minHeight = 500
maxHeight = 800

//Set directory to sort
//setdir /home/michael/Pictures/Uploads
setdir this+Uploads

//Separate by height
for height in minHeight..maxHeight by 10:separate height ExifImageHeight:height

print Finished with Height
44 changes: 44 additions & 0 deletions README
@@ -0,0 +1,44 @@
Photorg Programming Language
Created by Michael duPont (flyinactor91@gmail.com)
v1.0.0 [5 012 2012]
Python 2.7.3 - Unix



Usage: ./photorg.py (file-name.ptg) (debug [False]/True)
File call without filename and debug boolean launches user prompt
Filename must have the .ptg extention
Debug boolean turns debug on and overrides in-line changes. False by default
Photo-specific functions support: .jpg .jpeg .png .gif .tiff



Quick Photorg 1.0.0 Language Useage Guide

(...) indicates text optional
[...] indicates text required


separate [folderName] [exifName:exifValue] ([exifName:exifValue]...)
Runs through current directory and copies photos that match all
the given criteria into a new folder in the current directory

showexif [fileName] Lists all exif data for a photo
listphotos Lists all photos in current directory
setdir [this/folderPath] Set photo directory
getdir Returns current photo directory

for [varName] in [endNum/startNum..endNum] (by [skipNum]):[statement](;[statement]...)
Structure of a for-loop
Supports inner loops with one statement
All other statements are considdered part of the outer loop

+ - * / ** % ( ) All basic math functions supported
[varName] = [varValue] Assign a value to a variable
delete [varName] Remove the variable and value
type [varName] Check the type of a variable
// (Text) Comment out a line
print (Text and $var$) Output a line to the console
println (number) Output (number) of empty lines
debug [on/off] Turn the debugger on or off
quit Exit the interactive prompt

0 comments on commit fe051e0

Please sign in to comment.