mengw15 commented on code in PR #9032: URL: https://github.com/apache/texera/pull/9032#discussion_r4567528817
########## docs/operator-reference/src/main/scala/org/apache/texera/operatorreference/OperatorDocScanner.scala: ########## @@ -0,0 +1,340 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.texera.operatorreference + +import org.apache.texera.amber.operator.metadata.{ + GroupInfo, + OperatorMetadata, + OperatorMetadataGenerator +} + +import java.nio.charset.StandardCharsets +import java.nio.file.{Files, Path, Paths} +import java.util.Locale +import scala.jdk.CollectionConverters._ + +/** + * Regenerates the operator reference pages from the descriptors on the classpath. Run it from + * the repository root, where the default output directory resolves: + * + * sbt "OperatorReferenceGenerator/runMain org.apache.texera.operatorreference.OperatorDocScanner [outputDir]" + * + * Every markdown file under the output directory is replaced, except the hand-written + * `output-modes.md`. + */ +object OperatorDocScanner { + + private val DefaultOutputDir = "docs/reference/operators" + private val HandWrittenPages = Set("output-modes.md") Review Comment: Since the Python walkthrough was discussed, #9279 (Nov 4) added a UI parameters section to `user-defined-functions/r/_index.md` and #9339 (Nov 10) one to `java/java-udf.md`. The next run deletes both, so the follow-up needs to move them too. Nothing in a generated page says it is generated, so contributors will keep editing them. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
