-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add OPML import/export functionality
- Added `--import-from-opml` flag to import feeds from an OPML file - Added `--export-to-opml` flag to export feeds to an OPML file
- Loading branch information
Showing
5 changed files
with
251 additions
and
9 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
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,25 @@ | ||
package utils | ||
|
||
import ( | ||
"encoding/xml" | ||
) | ||
|
||
type OPML struct { | ||
XMLName xml.Name `xml:"opml"` | ||
Version string `xml:"version,attr"` | ||
Head Head `xml:"head"` | ||
Body Body `xml:"body"` | ||
} | ||
|
||
type Head struct { | ||
Title string `xml:"title,omitempty"` | ||
} | ||
|
||
type Body struct { | ||
Oultines []*Outline `xml:"outline"` | ||
} | ||
|
||
type Outline struct { | ||
Outlines []*Outline `xml:"outline"` | ||
XMLURL string `xml:"xmlUrl,attr,omitempty"` | ||
} |