Skip to content

Conversation

@MatteoGauthier
Copy link
Contributor

@MatteoGauthier MatteoGauthier commented Oct 2, 2021

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

This PR add remotion autocompletion

  • I’ve reduced the length of arguments label from "entry-file" to "entry" in order to fit in fig popup
  • npx remotion render
  • npx remotion still
  • npx remotion preview

@withfig-bot
Copy link
Contributor

withfig-bot commented Oct 2, 2021

Overview

src/create-video.ts:

Info:

URLs:

  • https://raw.githubusercontent.com/remotion-dev/remotion/main/packages/docs/static/img/logo-small.png

src/npx.ts:

Info:

Single Functions:

postProcess:

 function (out) {
        const cli = [...suggestions].reduce(
          (acc, { name }) => [...acc, name],
          []
        );
        return out
          .split("\n")
          .filter((name) => !cli.includes(name))
          .map((name) => ({
            name,
            icon: "fig://icon?type=command",
            loadSpec: name,
          }));
      }

URLs:

  • https://raw.githubusercontent.com/babel/logo/master/babel.png
  • https://reactnative.dev/img/pwa/manifest-icon-512.png
  • https://reactnative.dev/img/pwa/manifest-icon-512.png
  • https://tailwindcss.com/favicon-32x32.png
  • https://nextjs.org/static/favicon/favicon-16x16.png
  • https://raw.githubusercontent.com/pmndrs/branding/master/logo.svg
  • https://raw.githubusercontent.com/prisma/docs/main/src/images/favicon-16x16.png
  • https://eslint.org/assets/img/favicon.512x512.png
  • https://prettier.io/icon.png
  • https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Typescript_logo_2020.svg/240px-Typescript_logo_2020.svg.png
  • https://avatars.githubusercontent.com/u/20165699?s=200&v=4
  • https://fig.io/icons/fig-light.png
  • https://nextjs.org/static/favicon/favicon-16x16.png
  • https://raw.githubusercontent.com/remotion-dev/remotion/main/packages/docs/static/img/logo-small.png
  • https://raw.githubusercontent.com/remotion-dev/remotion/main/packages/docs/static/img/logo-small.png

src/yarn.ts:

Info:

Script:
cat "$(yarn global dir)/package.json"
script(function):

 function (context) {
    return `\cat ${context[context.length - 2]}/package.json`;
  }

Script:
cat "$(yarn global dir)/package.json"
postProcess(function):

 function (out) {
    if (out.trim() == "") {
      return [];
    }
    try {
      const packageContent = JSON.parse(out);
      const scripts = packageContent["scripts"];
      if (scripts) {
        return Object.keys(scripts).map((script) => ({ name: script }));
      }
    } catch (e) {}
    return [];
  }

Script:
yarn config list
postProcess(function):

 function (out) {
    if (out.trim() == "") {
      return [];
    }

    try {
      const startIndex = out.indexOf("{");
      const endIndex = out.indexOf("}");
      let output = out.substring(startIndex, endIndex + 1);
      // TODO: fix hacky code
      // reason: JSON parse was not working without double quotes
      output = output
        .replace(/\'/gi, '"')
        .replace("lastUpdateCheck", '"lastUpdateCheck"')
        .replace("registry", '"lastUpdateCheck"');
      const configObject = JSON.parse(output);
      if (configObject) {
        return Object.keys(configObject).map((key) => ({ name: key }));
      }
    } catch (e) {}

    return [];
  }

src/remotion.ts:

Info:

@withfig-bot
Copy link
Contributor

Hello @MatteoGauthier,
thank you very much for creating a Pull Request!
Here is a small checklist to get this PR merged as quickly as possible:

  • Do all subcommands / options which take arguments have the arg property (arg: {})?
  • Are all options modular? E.g. a -u -x instead of -aux
  • Have all other checks passed?

Please add a 👍 as a reaction to this comment to show that you read this.

@QuiiBz QuiiBz marked this pull request as draft October 2, 2021 16:24
@QuiiBz
Copy link
Contributor

QuiiBz commented Oct 2, 2021

Hi, thanks for contributing! I converted this PR to draft since npx remotion lambda is waiting to be done, feel free to mark it "Ready for review" when it's done!

@MatteoGauthier
Copy link
Contributor Author

Hi, thanks for contributing! I converted this PR to draft since npx remotion lambda is waiting to be done, feel free to mark it "Ready for review" when it's done!

Okay thanks you !

@MatteoGauthier
Copy link
Contributor Author

I've removed npx remotion lambda to the checklist remotion creator didn't want this feature implemented for now.

@MatteoGauthier MatteoGauthier marked this pull request as ready for review October 4, 2021 14:35
QuiiBz
QuiiBz previously requested changes Oct 4, 2021
Copy link
Contributor

@QuiiBz QuiiBz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love remotion, thanks for submitting a spec for it!

@MatteoGauthier
Copy link
Contributor Author

Love remotion, thanks for submitting a spec for it!

Thanks for your proposals, loved to work on this !

@mschrage mschrage dismissed QuiiBz’s stale review October 5, 2021 18:27

Changes were addressed!

Copy link
Contributor

@QuiiBz QuiiBz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot for this contribution 🎉

@mschrage mschrage merged commit c56643b into withfig:master Oct 5, 2021
@JonnyBurger
Copy link
Contributor

Thank you @MatteoGauthier and @QuiiBz! 🥳 Already in the Terminal, so cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants