Skip to content

Commit

Permalink
Importer - blog (mainly laitman.ru but with preparation for other lan…
Browse files Browse the repository at this point in the history
…guages as well)
  • Loading branch information
edoshor committed Jul 22, 2018
1 parent cf56b30 commit 3ea2c72
Show file tree
Hide file tree
Showing 113 changed files with 24,694 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ bindata/bindata.go
storage/.index
importer/roza/analysis/
importer/roza/data/
importer/twitter/data/
importer/twitter/data/
importer/blog/data/
48 changes: 48 additions & 0 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions cmd/blog.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package cmd

import (
"github.com/spf13/cobra"

"github.com/Bnei-Baruch/mdb/importer/blog"
)

func init() {
command := &cobra.Command{
Use: "blog-download",
Short: "Download blog data via wordpress API",
Run: func(cmd *cobra.Command, args []string) {
blog.Download()
},
}
RootCmd.AddCommand(command)

command = &cobra.Command{
Use: "blog-analyze",
Short: "Analyze downloaded blog data",
Run: func(cmd *cobra.Command, args []string) {
blog.Analyze()
},
}
RootCmd.AddCommand(command)

command = &cobra.Command{
Use: "blog-import",
Short: "Import blog data into MDB",
Run: func(cmd *cobra.Command, args []string) {
blog.Import()
},
}
RootCmd.AddCommand(command)

command = &cobra.Command{
Use: "blog-latest",
Short: "Import latest blog posts into MDB",
Run: func(cmd *cobra.Command, args []string) {
blog.ImportLatest()
},
}
RootCmd.AddCommand(command)
}
7 changes: 6 additions & 1 deletion config.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,9 @@ log=true
access-token=""
access-token-secret=""
consumer-key=""
consumer-secret=""
consumer-secret=""

[wordpress.laitman-ru]
url="https://www.laitman.ru/"
username=""
password=""
Loading

0 comments on commit 3ea2c72

Please sign in to comment.