forked from camerb/AHKs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
120 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#include FcnLib.ahk | ||
|
||
;TODO make this work so that the files are stuffed into a template for formatting | ||
;TODO make a central index file that keeps track of filename, title, subtitle | ||
;TODO process the rest using REFP | ||
Loop, C:\Dropbox\Public\camerb-ahk-net\raw-articles\* | ||
{ | ||
thisFile := A_LoopFileFullPath | ||
|
||
thisShortFile := A_LoopFileName | ||
thisShortFile := StringTrimRight(thisShortFile, 4) | ||
destHtml=C:\Dropbox\Public\camerb-ahk-net\%thisShortFile%.html | ||
;debug(destHtml, thisfile) | ||
|
||
thisTitle := FileReadLine(thisFile, 1) | ||
thisSubTitle := FileReadLine(thisFile, 2) | ||
|
||
;TODO process list items, save them to the index | ||
listItem=`n<li><a href="%thisShortFile%.html">%thisTitle% - %thisSubTitle%</a></li> | ||
|
||
index=0 | ||
Loop, read, %thisFile% | ||
{ | ||
index++ | ||
thisLine := A_LoopReadLine | ||
|
||
if (index <= 2) | ||
continue | ||
|
||
;debug(thisLine) | ||
|
||
if (mod(index, 3) == 0) | ||
continue | ||
if (mod(index, 3) == 1) | ||
{ | ||
addition=`n<h2>%thisLine%</h2> | ||
articleText .= addition | ||
} | ||
if (mod(index, 3) == 2) | ||
{ | ||
addition=`n<p>`n%thisLine%`n</p> | ||
articleText .= addition | ||
} | ||
|
||
;debug(articleText) | ||
} | ||
|
||
modifiedDate:=FileGetTime(thisFile) | ||
prettyDate:=FormatTime(modifiedDate, "wordsdate") | ||
|
||
header=<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">`n<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">`n`n<meta name="description" content="Camerb's AHK site - %thisTitle%">`n<title>Camerb's AHK site - %thisTitle%</title>`n<link href="default.css" rel="stylesheet" type="text/css" media="all">`n</head>`n<body>`n`n<center>`n<table width="700px"><tr><td>`n`n<h1>%thisTitle%</h1>`n`n<p>%thisSubtitle%</p>`n<a href="index.html">Back to the home page</a>`n | ||
footer=`n`n<br>`n<hr>`n<p><i>Last updated: %prettyDate%</i></p>`n`n</td>`n</tr>`n</table>`n</center>`n`n</body></html> | ||
|
||
wholeFile=%header%%articleText%%footer% | ||
FileCreate(wholeFile, destHtml) | ||
} | ||
ExitApp | ||
|
||
Esc::ExitApp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Sleep 100 | ||
FileDelete, C:\Dropbox\AHKs\Scheduled-20110912111245.ahk | ||
FileDelete, C:\Dropbox\AHKs\Scheduled-20110915172908.ahk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,41 @@ | ||
#include FcnLib.ahk | ||
#include FcnLib.ahk | ||
|
||
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | ||
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | ||
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | ||
#SingleInstance, Force | ||
CoordMode, Mouse, Screen | ||
blah:=72 | ||
|
||
In future reports, please use the agent's name, rather than "leasing agent." | ||
k::InputBox, blah | ||
j::circle(200, blah) ; segs = how many sides | ||
l::move(100, blah) ; segs = angle | ||
|
||
|
||
|
||
move(dis=32, ang=0) | ||
{ | ||
;~ static | ||
MouseGetPos, mx, my | ||
ang:=-ang*(3.141592653589793/180) | ||
mx:=dis*Cos(ang), my:=dis*Sin(ang) | ||
;~ list.=mx " --- " my "`n" | ||
;~ Clipboard = %list% | ||
MouseMove, %mx%, %my%, 0, R | ||
} | ||
|
||
|
||
circle(rad=100, seg=36, speed=200, offset=90) | ||
{ | ||
loop, %seg% | ||
{ | ||
move(rad/10, A_Index*(360/seg)+offset) | ||
sleep, speed/seg | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
~esc::ExitApp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,3 @@ | ||
#include FcnLib.ahk | ||
|
||
|
||
Loop, C:\Dropbox\Public\camerb-ahk-net\raw-articles\* | ||
{ | ||
thisFile := A_LoopFileFullPath | ||
|
||
thisShortFile := A_LoopFileName | ||
thisShortFile := StringTrimRight(thisShortFile, 4) | ||
destHtml=C:\Dropbox\Public\camerb-ahk-net\%thisShortFile%.html | ||
;debug(destHtml, thisfile) | ||
|
||
thisTitle := FileReadLine(thisFile, 1) | ||
thisSubTitle := FileReadLine(thisFile, 2) | ||
|
||
;TODO process list items | ||
listItem=`n<li><a href="%thisShortFile%.html">%thisTitle% - %thisSubTitle%</a></li> | ||
|
||
index=0 | ||
Loop, read, %thisFile% | ||
{ | ||
index++ | ||
thisLine := A_LoopReadLine | ||
|
||
if (index <= 2) | ||
continue | ||
|
||
;debug(thisLine) | ||
|
||
if (mod(index, 3) == 0) | ||
continue | ||
if (mod(index, 3) == 1) | ||
{ | ||
addition=`n<h2>%thisLine%</h2> | ||
articleText .= addition | ||
} | ||
if (mod(index, 3) == 2) | ||
{ | ||
addition=`n<p>`n%thisLine%`n</p> | ||
articleText .= addition | ||
} | ||
|
||
;debug(articleText) | ||
} | ||
|
||
;TODO make prettyDate | ||
header=<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">`n<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">`n`n<meta name="description" content="Camerb's AHK site - %thisTitle%">`n<title>Camerb's AHK site - %thisTitle%</title>`n<link href="default.css" rel="stylesheet" type="text/css" media="all">`n</head>`n<body>`n`n<center>`n<table width="700px"><tr><td>`n`n<h1>%thisTitle%</h1>`n`n<p>%thisSubtitle%</p>`n<a href="index.html">Back to the home page</a>`n | ||
footer=`n`n<br>`n<hr>`n<p><i>Last updated: %prettyDate%</i></p>`n`n</td>`n</tr>`n</table>`n</center>`n`n</body></html> | ||
|
||
wholeFile=%header%%articleText%%footer% | ||
FileCreate(wholeFile, destHtml) | ||
} | ||
ExitApp | ||
|
||
Esc::ExitApp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters