hackademic 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 285e9c888a7c5213b75349f3e32028f25e45b975
4
- data.tar.gz: 50c1106a390b3f5266c0a9b8fe09dc2de79b2e53
3
+ metadata.gz: 81fc1f100c2c747a4d4a7f16b412bd0c680a590a
4
+ data.tar.gz: b78ea9ebf87962f99dcce90f3ec421fa503d1a0e
5
5
  SHA512:
6
- metadata.gz: 5baa1bcfba0c3a5b2a48904ba59fdbdea2217cba612c197dfe0e5487641cd1acac6ecfd37b301c88c5f95c434f151b233a1e3a97c5e1039e7ffe3a7377f0b55b
7
- data.tar.gz: ce47babd7e1a4601c14157dbeea66df08d959bdaee2d98c2f25dbaa5c12983e25871a1bea1e7a146d1a19c340d730befb48ff58249162ccb8f325f62d18eec78
6
+ metadata.gz: d1df2217f96a25d9e49f58c73a683e8c052e8ba791e8c14a7175fda0a6a7ee16b9436051af8cf305396c60a54bcbf7df6deb6dc0d32ff21020c96be3e186421f
7
+ data.tar.gz: 067106d24fa9a1a36a4f20103885703e08295123e3fa7651c510a49e73f9f9b12e57b4786b6e2ea8023dd5654960dffe5cd33ead9da8eba515b4423e2ac038f2
data/README.md CHANGED
@@ -1,10 +1,180 @@
1
- # Hackademic
1
+ # Hackademic: Create and Manage Your Plain-Text Academic Workflow
2
2
 
3
- ## Create and manage your academic workflow
3
+ © 2016 Kizmeta and Matthew Petty [@lodestone](https://git.io/lodestone)
4
+
5
+ LICENSE MIT
6
+
7
+
8
+ # Installation
9
+
10
+ To install or update Hackademic, open up your Terminal and type `gem install hackademic`.
11
+
12
+ ```ruby
13
+ gem install hackademic
14
+ ```
15
+
16
+ ## Hackademic Help
17
+
18
+ `hackademic help`: could be more helpful, but essentially lists some choices. Ignore any I don't mention in this document. They may be temporary.
19
+
20
+ ```ruby
21
+ > hackademic help
22
+ Commands:
23
+ hackademic compile [FORMAT] # Type "hackademic help compile" to see choices
24
+ hackademic help [COMMAND] # Describe available commands or one specific command
25
+ hackademic install_templates # Install latest pandoc templates
26
+ hackademic list # List the current projects in the Projects folder
27
+ hackademic new [PROJECT] # Create something new!
28
+ hackademic setup [FOLDER] # Setup a new Hackademic repository at [FOLDER]
29
+ hackademic sync [subcommand] # Synchronize!
30
+ hackademic update_pandoc # Update to latest pandoc and pandoc-citeproc
31
+
32
+ ```
33
+
34
+ # Hackademic Commands
35
+
36
+ A List of useful Hackademic Commands
37
+
38
+ ## Creating New Projects: `hackademic new project`
39
+
40
+ To create a new project, open up your Terminal, `cd` into the directory you want the project to live in (usually `~/Dropbox/Hackademic`), and type the command `hackademic new project`, followed by a space and the name of the new project.
41
+
42
+ ```ruby
43
+ > cd ~/Dropbox/Hackademic
44
+ > hackademic new project <ProjectName>
45
+ ```
46
+
47
+ `hackademic new project [PROJECT_NAME]`: Create a new writing project in your project folder. This command will set up the folder structure, the git repo, and add other necessary files like templates.
48
+
49
+ ## Listing Current Projects: `hackademic list`
50
+
51
+ ```ruby
52
+ ❯ hackademic list
53
+
54
+ ❡ hackademic ➤➤➤
55
+
56
+ Listing projects found in /Users/lodestone/Dropbox/Hackademic/Projects/
57
+
58
+ PX7
59
+ ShaneDiss
60
+ ShaneDiss.old
61
+
62
+ ```
63
+
64
+ `hackademic list`: Spit out a list of projects that hackademic knows about.
65
+
66
+
67
+ ## Compiling Drafts: `hackademic compile`
68
+
69
+ `hackademic compile [OPTION]`: Compile your Main Draft into multiple formats using the included templates.
70
+ **Note:** You should `cd` into the *Project Root Folder* before running this command in the terminal.
71
+
72
+
73
+ ```ruby
74
+ ❯ hackademic help compile
75
+ Commands:
76
+ hackademic compile all # compile pdf, word doc, and latex file
77
+ hackademic compile docx # compile a docx
78
+ hackademic compile help [COMMAND] # Describe subcommands or one specific subcommand
79
+ hackademic compile latex # compile a latex document
80
+ hackademic compile pdf # compile a pdf
81
+ hackademic compile show_pdf_command # Show the pandoc command for pdf generation
82
+ ```
83
+
84
+ `hackademic compile docx`: Compile a Word doc only
85
+
86
+ `hackademic compile latex`: Compile the LaTeX only
87
+
88
+ `hackademic compile pdf` Compile a PDF only
89
+
90
+ `hackademic compile all` will compile a complete, transculded markdown file; a .tex file; MS Word Doc; and PDF.
91
+
92
+ `hackademic compile show_pdf_command`: Show the actual command that hackademic is running so you can see what's going on, tweak parameters, etc.
93
+
94
+
95
+ ## Syncing the *Notes* Folders Across Projects: `hackademic sync notes`
96
+
97
+ `hackademic sync notes`: Sync project-specific notes to the general notes folder.
98
+
99
+
100
+ This command synchronizes your project-specific notes in `~/Dropbox/Hackademic/Project/ProjectName/Resources/Notes` with your general notes folder, `~/Dropbox/Hackademic/Notes`.
101
+
102
+ It takes all the files for a given project and looks for references by name to notes in the note database (`~/Dropbox/Hackademic/Notes`). Those notes get copied over to the project. Further, any notes created in the project get pushed into the note database for happy goodness.
103
+
104
+ The benefit here is that you can reuse notes across projects without duplicating your work. Someday, we hope this will be a full-fledged *Zettelkasten*. :-0
105
+
106
+ Someday, this will be turned into a "background job" that won't require user intervention.
107
+
108
+ # Zotero, BetterBibTeX, and Zotfile Preferences for Hackademics
109
+
110
+ ## Zotero Settings
111
+
112
+ Set Zotero's `Linked Attachment Base Directory` like so:
113
+
114
+ ![Zotero Prefs - Linked Attachment Base Directory](http://z.nx.is/VwJ.png)
115
+
116
+ ## BetterBib{La)TeX Settings
117
+
118
+ Download the latest version of [BetterBibLaTeX](https://zotplus.github.io/better-bibtex/) from their regularly updated [Git Repo](https://github.com/ZotPlus/zotero-better-bibtex).
119
+
120
+ Under the `BetterBibTeX` tab of Zotero's Settings, set the `Citation Key Format` to:
121
+
122
+ [auth:fold:lower:nopunct:alphanum]-[year]
123
+
124
+ ![Better BibTeX - Citation Prefs](http://z.nx.is/e3R.png)
125
+
126
+ ## Zotfile
127
+
128
+ ### Zotfile Hidden Setting
129
+
130
+ In order to get Zotfile to use the stable, bibtex citekey in renaming the pdf attachments, we need to adjust a hidden setting in Firefox itself.
131
+
132
+ In the Firefox URL bar type:
133
+
134
+ `about:config`
135
+
136
+ And hit enter. You will see a warning, just click through. Seriously, Firefox is just trying to scare us. We are trained professionals. We know what we are doing.
137
+
138
+ Search the page that comes up for:
139
+
140
+ `extensions.zotfile.wildcards.user`
141
+
142
+ Double click it and paste the following JSON data in the text box.
143
+
144
+ ```json
145
+ {
146
+ "1": {
147
+ "field": "extra",
148
+ "operations": [
149
+ {
150
+ "flags": "g",
151
+ "function": "exec",
152
+ "regex": "bibtex: *(.*)",
153
+ "group": 1
154
+ }
155
+ ]
156
+ }
157
+ }
158
+ ```
159
+
160
+ ### Zotfile Preferences
161
+
162
+ Now we can adjust our Zotfile renaming preferences. Make it look like the following screenshot. For clarity, the format is: `{%1}_{%t}` (That's a 1 (one) not an I or i)
163
+
164
+ Also make sure to change the maximum length of title to `39`.
165
+
166
+
167
+ ![Zotfile - Renaming Rules](http://z.nx.is/1sQ.png)
168
+
169
+
170
+ You should also set Zotfile's `General Settings` to `/Hackademic-Root-Folder/Libraries/My-Library`. See the following screenshot.
171
+
172
+
173
+ ![Zotfile - General Settings](http://z.nx.is/Grx.png)
174
+
175
+
176
+ Now, **GO FORTH AND DO RESEARCH!**
4
177
 
5
- ### Hackademic manages your plain-text academic workflow
6
178
 
7
179
 
8
- &copy; 2016 Kizmeta and Matthew Petty [@lodestone](https://git.io/lodestone)
9
180
 
10
- LICENSE MIT
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'hackademic'
3
- s.version = '0.2.7'
3
+ s.version = '0.2.8'
4
4
  s.date = '2016-01-03'
5
5
  s.summary = "Create and manage your academic workflow"
6
6
  s.description = "Hackademic manages your plain-text academic workflow."
@@ -60,6 +60,7 @@ module Hackademy
60
60
  # #{config.output_directory}/#{config.transcluded_draft}
61
61
  # }.gsub(/\s+/, ' ')
62
62
  %{pandoc \
63
+ --template=#{config.pdf_template} \
63
64
  -t html5 \
64
65
  --bibliography=#{config.bibliography} \
65
66
  --csl=#{config.citation_style} \
@@ -8,4 +8,6 @@ hackademic:
8
8
  citation_style: Resources/csl/american-sociological-association.csl
9
9
  docx_template: Resource/templates/pandoc-word-template.docx
10
10
  latex_template: Resources/templates/xelatex.template
11
+ html_template: Resources/templates/default.html5
12
+ pdf_template: Resources/templates/default.html5
11
13
  support_directory: Resources
@@ -2,55 +2,64 @@
2
2
  <html$if(lang)$ lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <meta name="generator" content="pandoc">
5
+ <meta name="generator" content="hackademic,pandoc">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7
7
  <style>
8
8
  * {
9
- font-family: Garamond;
9
+ font-family: "Garamond";
10
+ }
11
+ code {
12
+ white-space: pre;
10
13
  }
11
14
  </style>
12
- $for(author-meta)$
13
- <meta name="author" content="$author-meta$">
14
- $endfor$
15
- $if(date-meta)$
16
- <meta name="dcterms.date" content="$date-meta$">
17
- $endif$
18
- $if(keywords)$
19
- <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$">
20
- $endif$
21
- <title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
22
- <style type="text/css">code{white-space: pre;}</style>
23
- $if(quotes)$
24
- <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
25
- $endif$
26
- $if(highlighting-css)$
27
- <style type="text/css">
28
- $highlighting-css$
29
- </style>
30
- $endif$
31
- $for(css)$
32
- <link rel="stylesheet" href="$css$">
33
- $endfor$
34
- $if(math)$
35
- $math$
36
- $endif$
15
+ $for(author-meta)$
16
+ <meta name="author" content="$author-meta$">
17
+ $endfor$
18
+ $if(date-meta)$
19
+ <meta name="dcterms.date" content="$date-meta$">
20
+ $endif$
21
+ $if(keywords)$
22
+ <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$">
23
+ $endif$
24
+ <title>
25
+ $if(title-prefix)$
26
+ $title-prefix$
27
+ $endif$
28
+ $if(pagetitle)$
29
+ $pagetitle$
30
+ $endif$
31
+ </title>
32
+ $if(quotes)$
33
+ <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
34
+ $endif$
35
+ $if(highlighting-css)$
36
+ <style type="text/css">
37
+ $highlighting-css$
38
+ </style>
39
+ $endif$
40
+ $for(css)$
41
+ <link rel="stylesheet" href="$css$">
42
+ $endfor$
43
+ $if(math)$
44
+ $math$
45
+ $endif$
37
46
  <!--[if lt IE 9]>
38
47
  <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
39
48
  <![endif]-->
40
- $for(header-includes)$
41
- $header-includes$
42
- $endfor$
49
+ $for(header-includes)$
50
+ $header-includes$
51
+ $endfor$
43
52
  </head>
44
53
  <body>
45
54
  $for(include-before)$
46
- $include-before$
55
+ $include-before$
47
56
  $endfor$
48
57
  $if(title)$
49
58
  <header>
50
59
  <h1 class="title">$title$</h1>
51
- $if(subtitle)$
52
- <h1 class="subtitle">$subtitle$</h1>
53
- $endif$
60
+ $if(subtitle)$
61
+ <h1 class="subtitle">$subtitle$</h1>
62
+ $endif$
54
63
  $for(author)$
55
64
  <h2 class="author">$author$</h2>
56
65
  $endfor$
@@ -61,12 +70,12 @@
61
70
  $endif$
62
71
  $if(toc)$
63
72
  <nav id="$idprefix$TOC">
64
- $toc$
73
+ $toc$
65
74
  </nav>
66
75
  $endif$
67
- $body$
68
- $for(include-after)$
69
- $include-after$
70
- $endfor$
76
+ $body$
77
+ $for(include-after)$
78
+ $include-after$
79
+ $endfor$
71
80
  </body>
72
81
  </html>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackademic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Petty