Closed gatlinnewhouse closed 7 years ago
Was working on #3 in the golint suggestions when I ran a test and got this error:
➜ go run src/driveraker.go
Reading configuration...
Finished reading configuration!
Syncing Google Drive...
drive: Resolving...
Done syncing!
Interpreting command line output...
File paths: []
Done!
docx file paths: []
Converting synced docx files into markdown files...
Adding hugo front-matter to markdown files...
[ERROR] Error compiling a website with hugo: exit status 255
hugo: Started building sites ...
ERROR 2017/08/01 20:30:30 failed to parse page metadata for "articles/article_template.docx.md": invalid character '"' after object key:value pair
Moving compiled hugo site to the production directory...
[ERROR] Error moving hugo compiled site to production directory: exit status 1
^Csignal: interrupt
Fixed that issue and ran into another:
➜ go run src/driveraker.go
Reading configuration...
Finished reading configuration!
Syncing Google Drive...
drive: Resolving...
Exported '/home/deleuze/drivetemp/The_Quest/WEB_STUFF/TEST_DOCUMENTS_FOR_DRIVERAKER/article_template/article_template' to '/home/deleuze/drivetemp/The_Quest/WEB_STUFF/TEST_DOCUMENTS_FOR_DRIVERAKER/article_template/article_template_exports/article_template.docx'
Done syncing!
Interpreting command line output...
File paths: [ to '/home/deleuze/drivetemp/The_Quest/WEB_STUFF/TEST_DOCUMENTS_FOR_DRIVERAKER/article_template/article_template_exports/article_template.docx']
Done!
docx file paths: [ to '/home/deleuze/drivetemp/The_Quest/WEB_STUFF/TEST_DOCUMENTS_FOR_DRIVERAKER/article_template/article_template_exports/article_template.docx']
Converting synced docx files into markdown files...
Converting /home/deleuze/drivetemp/The_Quest/WEB_STUFF/TEST_DOCUMENTS_FOR_DRIVERAKER/article_template/article_template_exports/article_template.docx
pandoc: []
Adding hugo front-matter to markdown files...
Moving inline image to hugo directory...
Moved the image: []
Deleted line: DRVRKR\_TAGS: tag1, tag2, tag3, tag4
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line:
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line: DRVRKR\_CATEGORIES: cat1, cat2, cat3, cat4
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line:
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line: DRVRKR\_PUB\_DATE: 2017 05 04
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line:
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line: DRVRKR\_UPDATE\_DATE: 2017 06 01
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line:
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line: <img src="media/image2.png" alt="ggg.png" width="624" height="350" />
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line:
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line: ##### CAPTION FOR IMAGE (must be under an image)
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line:
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line: # Headline (write one here, or leave this in)
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line:
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line: ## Subheader (write one here, or leave this in)
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line:
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line: #### By NAME1 LAST1, NAME2 LAST2, and NAME3 LAST3 (write name\[s\] here)
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Deleted line:
from /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Moving inline image to hugo directory...
Moving the image: []
Done moving fff.png
Writing a new inline-image path for /home/deleuze/hugo-test-site/content/articles/article_template.docx.md
Done!
hugo: Started building sites ...
Built site for language en:
0 draft content
0 future content
0 expired content
1 regular pages created
24 other pages created
0 non-page files copied
0 paginator pages created
4 tags created
4 categories created
total in 6 ms
Moving compiled hugo site to the production directory...
[ERROR] Error moving hugo compiled site to production directory: exit status 1
This is probably due to not having the /var/www/html/ directory, or not having it in my config, or not having the right permissions on the directory.
Implementing support for modified documents gameplan:
➜ go run src/driveraker.go
# command-line-arguments
src/driveraker.go:98: non-name *key on left side of :=
src/driveraker.go:246: non-name *key on left side of :=
src/driveraker.go:269: syntax error: missing { after for clause
➜ go run src/driveraker.go
# command-line-arguments
src/driveraker.go:98: undefined: key
src/driveraker.go:100: undefined: key
src/driveraker.go:105: undefined: key
src/driveraker.go:245: undefined: i
src/driveraker.go:245: undefined: matches
src/driveraker.go:245: undefined: i
src/driveraker.go:246: undefined: matches
src/driveraker.go:246: undefined: i
src/driveraker.go:247: undefined: matches
src/driveraker.go:247: undefined: i
src/driveraker.go:247: too many errors
➜ go run src/driveraker.go
# command-line-arguments
src/driveraker.go:67: not enough arguments in call to s.saveLoop
have (string)
want (string, *sync.WaitGroup)
src/driveraker.go:244: not enough arguments in call to hashtable.saveLoop
have (string)
want (string, *sync.WaitGroup)
src/driveraker.go:266: cannot use &saveHashtable (type **sync.WaitGroup) as type *sync.WaitGroup in argument to hashtable.saveLoop
src/driveraker.go:276: undefined: i
src/driveraker.go:284: cannot use modifiedDocuments (type []string) as type string in send
src/driveraker.go:298: undefined: filePathsToSync
src/driveraker.go:298: cannot use &lookupPathsInHashtable (type **sync.WaitGroup) as type *sync.WaitGroup in argument to alreadySyncedAndCompiled
src/driveraker.go:299: undefined: filePathsToSync
src/driveraker.go:300: undefined: filePathsToSync
src/driveraker.go:304: cannot call non-function findModifiedDocuments (type *sync.WaitGroup)
src/driveraker.go:304: too many errors
➜ go run src/driveraker.go
# command-line-arguments
src/driveraker.go:158: undefined: saveHashtable in saveHashtable.Done
src/driveraker.go:296: undefined: filePathsToSync
src/driveraker.go:297: undefined: filePathsToSync
src/driveraker.go:302: cannot use &findModified (type **sync.WaitGroup) as type *sync.WaitGroup in argument to findModifiedDocuments
src/driveraker.go:711: undefined: hastablePath
➜ go run src/driveraker.go
# command-line-arguments
src/driveraker.go:710: undefined: hastablePath
➜ go run src/driveraker.go
Reading configuration...
Finished reading configuration!
Syncing Google Drive...
drive: Resolving...
Exported '/home/deleuze/drivetemp/The_Quest/WEB_STUFF/TEST_DOCUMENTS_FOR_DRIVERAKER/article_template/article_template' to '/home/deleuze/drivetemp/The_Quest/WEB_STUFF/TEST_DOCUMENTS_FOR_DRIVERAKER/article_template/article_template_exports/article_template.docx'
Done syncing!
Interpreting command line output...
Looking for already synced documents...
^Csignal: interrupt
Implement compiling the hugo site in a functionImplement using nginx to serve the HTML documentnginx or apache or other html servers should be running alreadyImplement support for modified documentsUse the hashtable structure for keeping track of synced and modified documents in order to eliminate redundancy