Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to import and export entries #588

Open
Awilum opened this issue Sep 18, 2022 · 0 comments
Open

Add ability to import and export entries #588

Awilum opened this issue Sep 18, 2022 · 0 comments

Comments

@Awilum
Copy link
Member

Awilum commented Sep 18, 2022

We should have ability to import and export entries from files.

New Entries methods:

/**
 * Import.
 * 
 * @param string $file File with data to import.
 */
public function import(string $file): bool

/**
 * Export.
 * 
 * @param string $id Entries ID to fetch data and export to file.
 * @param array $options Export options.
 */
public function export(string $id, array $options = []): bool

New console commands:

entries:export
entries:import

New settings:

...
entries:
  ...
  export: 
    path: "_export"
    filename: ""
    serializer: "json"
  ...
...

Updated settings (added default extension):

...
serializers:
  json: 
    extension: "json"
  json5: 
    extension: "yaml"
  yaml: 
    extension: "json5"
  neon: 
    extension: "neon"
  frontmatter: 
    extension: "md"
  phparray: 
    extension: "php"
...
@Awilum Awilum self-assigned this Sep 18, 2022
@Awilum Awilum added this to the 1.x milestone Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant